package com.lucien.admin.controller.system;

import com.lucien.common.result.GlobalResult;
import com.lucien.system.service.SysGroupMemberService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Lucien
 * @Date 2021/6/13 22:30
 * @Version 1.0
 * @Description:
 */
@RequestMapping("/member")
@Api(tags = "群组成员接口")
@RestController
public class SysGroupMemberController {

    @Autowired
    private SysGroupMemberService groupMemberService;

    @GetMapping("/grouplen/{groupId}")
    @ApiOperation(value = "获取群聊成员数量")
    public GlobalResult groupLen(@PathVariable("groupId") Long groupId){
        int result = groupMemberService.groupLen(groupId);
        return GlobalResult.success("查询成功",result);
    }

}
